package Demo3;

public class Test {
    public static void main(String[] args) {
        //直接使用外部类名调用
//        Animal.Bird bird = new Animal.Bird("blue");
//        System.out.println(bird);

        //先创建外部对象
//        Animal2 animal2 = new Animal2("qingqing");
//        Animal2.Frog frog = animal2.new Frog(1);
//        System.out.println(frog);

        //直接实现该接口
//        IRunning iRunning = new IRunning() {
//            @Override
//            public void run() {
//                System.out.println("Running...");
//            }
//
//        };
//        iRunning.run();

        //直接继承该类
        People p = new People("zhangsan", 18) {
            @Override
            public void show() {
                System.out.println("hello world");
            }
        };
        p.show();
        System.out.println(p.toString());
    }
}
